/* 自定义样式 */

/* 全局样式 */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
}

/* 导航栏样式 */
.navbar-brand {
    font-weight: bold;
    font-size: 1.5rem;
}

/* 卡片样式 */
.card {
    border: none;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    transition: box-shadow 0.15s ease-in-out;
}

.card:hover {
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

/* 文章内容样式 */
.post-content {
    font-size: 1.1rem;
    line-height: 1.8;
}

.post-content h1,
.post-content h2,
.post-content h3,
.post-content h4,
.post-content h5,
.post-content h6 {
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.post-content h1 {
    font-size: 2.5rem;
    border-bottom: 2px solid #e9ecef;
    padding-bottom: 0.5rem;
}

.post-content h2 {
    font-size: 2rem;
    border-bottom: 1px solid #e9ecef;
    padding-bottom: 0.3rem;
}

.post-content h3 {
    font-size: 1.5rem;
}

.post-content p {
    margin-bottom: 1.5rem;
}

.post-content blockquote {
    border-left: 4px solid #007bff;
    padding-left: 1rem;
    margin: 1.5rem 0;
    background-color: #f8f9fa;
    padding: 1rem;
    border-radius: 0.25rem;
}

.post-content blockquote p {
    margin-bottom: 0;
    font-style: italic;
}

.post-content ul,
.post-content ol {
    margin-bottom: 1.5rem;
    padding-left: 2rem;
}

.post-content li {
    margin-bottom: 0.5rem;
}

.post-content img {
    max-width: 100%;
    height: auto;
    border-radius: 0.375rem;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    margin: 1rem 0;
}

.post-content table {
    width: 100%;
    margin-bottom: 1.5rem;
    border-collapse: collapse;
}

.post-content table th,
.post-content table td {
    padding: 0.75rem;
    border: 1px solid #dee2e6;
    text-align: left;
}

.post-content table th {
    background-color: #f8f9fa;
    font-weight: 600;
}

/* 代码块样式 */
.post-content pre {
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 0.375rem;
    padding: 1rem;
    margin: 1.5rem 0;
    overflow-x: auto;
}

.post-content code {
    background-color: #f8f9fa;
    padding: 0.2rem 0.4rem;
    border-radius: 0.25rem;
    font-size: 0.9em;
    color: #e83e8c;
}

.post-content pre code {
    background-color: transparent;
    padding: 0;
    color: inherit;
}

/* 链接样式 */
.post-content a {
    color: #007bff;
    text-decoration: none;
}

.post-content a:hover {
    color: #0056b3;
    text-decoration: underline;
}

/* 评论样式 */
.comment-item {
    border-bottom: 1px solid #e9ecef;
}

.comment-item:last-child {
    border-bottom: none;
}

.comment-content {
    white-space: pre-wrap;
    word-wrap: break-word;
}

/* 标签样式 */
.badge {
    font-size: 0.8em;
    font-weight: 500;
}

/* 分页样式 */
.pagination {
    margin-top: 2rem;
}

/* 侧边栏样式 */
.sidebar .card {
    margin-bottom: 1.5rem;
}

.sidebar .list-group-item {
    border: none;
    padding: 0.75rem 0;
}

.sidebar .list-group-item:hover {
    background-color: transparent;
    color: #007bff;
}

/* 搜索框样式 */
.input-group .form-control:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .post-content {
        font-size: 1rem;
    }
    
    .post-content h1 {
        font-size: 2rem;
    }
    
    .post-content h2 {
        font-size: 1.5rem;
    }
    
    .post-content h3 {
        font-size: 1.25rem;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    .btn-group-sm .btn {
        padding: 0.25rem 0.5rem;
        font-size: 0.75rem;
    }
}

/* 动画效果 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card {
    animation: fadeIn 0.5s ease-out;
}

/* 加载状态 */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* 工具提示样式 */
.tooltip {
    font-size: 0.875rem;
}

/* 自定义滚动条 */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

